<?php

// Init owncloud

require_once(OC_App::getAppPath('company') . "/lib/helper.php");

$LoginStats = PUtil::checkUserLogin(true);
if ($LoginStats !== true) {
   echo $LoginStats;
   exit();
} elseif (!PFactory::isMasterUser()) {
   echo "您无权访问该资源！";
   exit();
}

OCP\JSON::callCheck();
$jobid = JRequest::getInt('jobid', 0);
$jobManagerList = PCompanyHelper::getJobManagerList($jobid);

$tmpl = new OCP\Template('jobposition', 'part.jobmanager.list', '');
$tmpl->assign('jobManagerList', $jobManagerList);
$tmpl->printPage();